package com.lanou3g.hw0426;

import java.sql.SQLException;
import java.sql.Statement;

/**
 * Created by dllo on 18/4/26.
 */
public class Test01 {
    public static void main(String[] args) {
        String sql = "insert into `login`(username,pwd,word) " +
                "values('username','pwdRight','最喜欢的一句话')";
        Statement statement = JDBCUtil.getStatement();
        try {
            int rows = statement.executeUpdate(sql);
            if (rows > 0) {
                System.out.println("成功");
            } else {
                System.out.println("失败");
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        JDBCUtil.closeResource(statement);
        JDBCUtil.closeConn();
    }
}
